package fr.afcepf.al23.qualite.test;

import java.io.IOException;

/**
 * Class for the database test restoration.
 * @author Stagiaire
 */
public final class RestoreDatabase {
    /**
     * Static Method calling restoration script.
     */
    public static void restoration() {
        try {
            String file = "creabaseQualite.bat";
            String path =
                    Thread.currentThread().getContextClassLoader().getResource(file).getPath();
            Process proc = Runtime.getRuntime().exec(path);
            proc.waitFor(); // attendre la fin du process au cas où le process soit lourd, avant de continuer
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
        // TODO dao = new DaoUtilisateur();
    }
    /**
     * Default constructor.
     */
    private RestoreDatabase() {
    }
}
